package annotationAop2;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created by zwj on 15/9/29.
 */
public class AnnotationAopMain2 {
    public static void main(String[] args){
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("annotationAop2.xml");
        //从配置文件中获取的bean才能被织入，new MonitorService()获取的对象不能被织入
        MonitorService monitorService = (MonitorService) ctx.getBean("monitorService2");
        monitorService.shishi();
    }


}
